using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using TMS.Domain.Entity;

namespace TMS.Infrastructrue.Persistence.Configuration
{
    public class RoleConfiguration : Base.BaseEntityConfiguration<Role>
    {
        public override void Configure(EntityTypeBuilder<Role> builder)
        {
            base.Configure(builder);

            builder.ToTable("role");

            builder.Property(x=>x.TeacherId).HasColumnName("teacher_id").HasMaxLength(2000000).HasColumnOrder(1);
            builder.Property(x=>x.IsMaster).HasColumnName("is_master").HasMaxLength(2000000).HasColumnOrder(2);
            builder.Property(x=>x.IsInstructor).HasColumnName("is_instructor").HasMaxLength(2000000).HasColumnOrder(3);
            builder.Property(x=>x.IsTeacher).HasColumnName("is_teacher").HasMaxLength(2000000).HasColumnOrder(4);
        }
    }
}